﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="_619BJP.Models"%>
<%@ Import Namespace="_619BJP.Web.Controllers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%=ViewData["Title"] %> - 619保健品点评网
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <link href="../../Content/css/Instance/Brand/BrandDetails.css" rel="stylesheet" type="text/css" />
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<% BrandModel brand = (BrandModel)ViewData.Model;%>
    <div id="navigation">
        <span>你现在的位置： <a href="/Home/Index">首页</a> ></span> 
        <span > <a href="/Brand/BrandIndex">保健品品牌</a> ></span>
        <span > <a class="current_nav" href="#" > <%=Html.Encode(brand.name)%></a></span>
        <% if (!string.IsNullOrEmpty(brand.e_name))
           { %>
        <span > <a class="current_nav" href="#" >   <%=Html.Encode(brand.e_name)%></a></span>
           <%} %>
    </div>

    <div id="brand_detail">
        <div id="brand_info">
            <div id="brand_logo">
                <img src="../..<%=brand.logo %>" />
            </div>
            <div id="brand_info_detail">
                <div id="brand_name">
                    <%=brand.name %>
                    <% if (!string.IsNullOrEmpty(brand.e_name))
                       { %>
                       <%=brand.e_name %>
                    <%} %>
                </div>
<%--                <div id="brand_origin">产地：<span>中国</span></div>--%>
                <div id="brand_web">官方网址：<a href="<%=brand.web_site %>"><%=brand.web_site %></a></div>
                <div id="brand_desc"><%=brand.description %></div>
            </div>
        </div>
<%--        <div id="product_category"></div>--%>
        <div id="product_list">
            <div id="list_title">产品列表</div>
<%--            <div id="list_sort">
                <div id="sort_title">产品排序：</div>
                <div class="sortButton">默认排序</div>
                <div class="sortButton">价格 ↓</div>
                <div class="sortButton">评论 ↑</div>
            </div>--%>
        </div>
        <div id="product_list_detail">
        <%System.Data.DataSet ds = (new BrandController()).GetAllProductsByBrand(brand.id);
          if (ds.Tables[0].Rows.Count > 0)
          {
         %>
            <div id="product_info">
                <ul>
                <%for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                  {%>
                    <li>
                        <a href="/Product/ProductDetails/<%=ds.Tables[0].Rows[i]["id"].ToString()%>"><img src="../..<%=ds.Tables[0].Rows[i]["img_url"].ToString() %>"/></a>
                        <div class="product_detail">
                            <table>
                                <tr>
                                    <td colspan="2" class="product_title"><a href="/Product/ProductDetails/<%=ds.Tables[0].Rows[i]["id"].ToString()%>"><%=ds.Tables[0].Rows[i]["product_name"].ToString()%></a></td>
                                </tr>
                                <tr>
                                    <td class="td1">点击数：</td>
                                    <td><%=ds.Tables[0].Rows[i]["view_count"].ToString()%></td>
                                </tr>
                                <tr>
                                    <td class="td1">参考价格：</td>
                                    <td>￥<%=ds.Tables[0].Rows[i]["market_price"].ToString()%> </td>
                                </tr>
                                <tr>
                                    <td class="td1">产品介绍：</td>
                                    <td><% string pro_des = (new ArticleController()).TitleForShort(ds.Tables[0].Rows[i]["description"].ToString(), 200) + "...";%>
                                        <%=pro_des %>
                                    </td>
                                </tr> 
                            </table>
                        </div>
                    </li>
                    <%} %>
                </ul>
            </div>
        </div>
        <div id="page_turn">
			<ul id="page_turn_list">
				<li id="page_turn_next_page" class="page_turn_other_page"><a href="#">下一页</a></li>
				<li class="page_turn_other_page"><a href="#">13</a></li>
				<li class="page_turn_ellipsis">...</li>
				<li class="page_turn_other_page"><a href="#">5</a></li>
				<li class="page_turn_other_page"><a href="#">4</a></li>	
				<li class="page_turn_other_page"><a href="#">3</a></li>
				<li class="page_turn_other_page"><a href="#">2</a></li>
				<li class="page_turn_now_page"><a href="#">1</a></li>
			</ul>
		</div>
                    <%}
          else
          {%>
          暂无
            <%} %>
    </div>

    <div id="like">
        <div class="title">您可能喜欢</div>
        <%System.Data.DataSet like_ds = (new BrandController()).GetPartProductsByBrand(brand.id,4);
          if (like_ds.Tables[0].Rows.Count > 0)
          {
         %>
        <ul>
             <%for (int j = 0; j < like_ds.Tables[0].Rows.Count; j++)
               {%>
            <li>
                <a href="/Product/ProductDetails/<%=like_ds.Tables[0].Rows[j]["id"].ToString()%>"><img src="../..<%=like_ds.Tables[0].Rows[j]["img_url"].ToString() %>"/></a>
                <div class="prodcut_name"><a href="/Product/ProductDetails/<%=like_ds.Tables[0].Rows[j]["id"].ToString()%>"><%=like_ds.Tables[0].Rows[j]["product_name"].ToString()%></a></div>
            </li>
            <%} %>
        </ul>
        <%}else{ %>暂无
        <%}%>
    </div>

<%--    <div id="browsing_history">
        <div class="title">你的浏览记录 <a>清空</a> </div>
        <ul>
            <li>
                <img src="../../ProductImages/201109135414.jpg" />
                <div class="prodcut_des">产品描述 </div>
            </li>
        </ul>
    </div>--%>

<%--    <div id="ad_1">
        <img  src="../../AdImages/ad_1.jpg" alt=""/>
    </div>--%>

</asp:Content>
